package com.plian.system.entity.pf;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @Description: TODO
 * @Author: Take-off
 * @Date: 2023/3/27 9:32 AM
 * @Param
 * @return
 * @Version: 1.0
 **/
@Data
@TableName("pf_leader_ship_pay_record")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LeadershipPayRecord 对象", description = "领导薪酬发放备案")
public class LeadershipPayRecord extends BaseEntity {

    @ApiModelProperty(value = "备案号")
    private String code;

    @ApiModelProperty(value = "填报年度")
    private String fillingYear;

    @ApiModelProperty(value = "填报单位")
    private String fillingUnitId;

    @ApiModelProperty(value = "上报日期")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    private Date fillingTime;

    @ApiModelProperty(value = "填报人")
    private String fillingUser;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "任期开始")
    private String startYear;

    @ApiModelProperty(value = "任期结束")
    private String endYear;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "审批时间")
    private Date approvedTime;

    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    @ApiModelProperty(value = "单据类型")
    private String formType;

    @ApiModelProperty(value = "是否备案申明:0-否；1-是")
    private Integer isDeclare;

    @ApiModelProperty(value = "附件")
    @TableField(exist = false)
    private List<HashMap> docList;

    @ApiModelProperty(value = "详情")
    @TableField(exist = false)
    private List<LeadershipPayRecordDetail> leadershipPayRecordDetails;

    @ApiModelProperty(value = "申明")
    @TableField(exist = false)
    private List<LeadershipPayRecordDeclare> leadershipPayRecordDeclares;

    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;

    @ApiModelProperty(value = "数据来源id", required = true)
    private String dataSourceId;

    @ApiModelProperty(value = "附件ids")
    @TableField(exist = false)
    private String attachIds;
}
